<?php

/*
 * CopyRight  : (C)2012-2099 HaoTeam Inc.
 * Document   : Common.php
 * Created on : 2021-3-24 9:23:42
 * Author     : Tiger <1192851302@qq.com>
 * Description: This is NOT a freeware, use is subject to license terms.
 *              这即使是一个免费软件,使用时也请遵守许可证条款,得到当时人书面许可.
 *              未经书面许可,不得翻版,翻版必究;版权归属 HaoTeam Inc;
 */

namespace app\admin\controller;

/**
 * 
 * Class Common
 * Tiger <1192851302@qq.com> 2021-3-24 9:23:42
 */
class Common {

    /**
     * 获取系统配置
     * @author Tiger <1192851302@qq.com>
     * @return type
     */
    public function get_config() {
        return app('json')->successful(system_config([
                    'admin_name',
                    'admin_url'
        ]));
    }

    /**
     * 清理系统缓存
     * @auth true
     * @author Tiger <1192851302@qq.com>
     * @return type
     */
    public function clear_cache() {
        \think\facade\Cache::clear();
        return app('json')->successful('缓存清理完毕');
    }

}
